package com.cetcs.kmga.dataManager.service.dataManager;


import com.alibaba.fastjson.JSONObject;
import com.cetcs.kmga.common.Data;
import com.cetcs.kmga.common.Page;
import com.cetcs.kmga.dataManager.entity.dataManager.Resrc;
import com.cetcs.kmga.dataManager.entity.dataManager.vo.*;

import java.util.List;

/**
 * 数据监管
 * Created by XingWen on 2016/3/29.
 */
public interface DataManagerService {
    //获得数据源列表
    public ResourceTreeVo getDataResourceList(Data dataMap) throws Exception;
    //获得数据源列表
    public List<Resrc> getResourceLists(Data dataMap) throws Exception;
    //同步数据源
    public ResourceTreeVo synchronizeDataResource(Data dataMap) throws Exception;
    //获得审计对象信息
    public AuditObjectConfigVo getAuditObjectById(Data dataMap) throws Exception;
    //配置审计对象
    public Integer configureAuditObject(Data dataMap) throws Exception;
    //根据ID查询数据源
    public ResourceVo getResourceById(Data dataMap) throws Exception;
    //新增或者修改数据源
    public Integer saveOrUpdataResource(Data dataMap) throws Exception;
    //删除数据源
    public Integer deleteResource(Data dataMap) throws Exception;

    List<ResrcTypeVo> getAndAddResourceType(Data dataMap) throws Exception;

    //获取安全事件列表分页
    public Page getSecuRuleByResourceId(Data dataMap) throws Exception;

    //判断 资源是否已经存在
    public Integer isExitForResource(Data dataMap) throws Exception;
    //判断 审计对象是否已经存在
    public Integer isExitForAuditObject(Data dataMap) throws Exception;
    //更新告警规则 根据规则ID
    public Integer updateSecuRule(Data dataMap) throws Exception;






    //==================== zhangchunlin start ======================//
    //查询用户表
    List findSysUsers(String keyword);
    //保存源获取告警规则,id为0时添加,大于0时修改
    int saveSecuRuleByResourceId(SecuRuleAddVo vo);
    //查询告警规则详情
    JSONObject findSecuRuleById(String id);
    //根据ID删除告警规则
    int removeSecuRuleById(String id);
    //根据ID批量删除告警规则
    int batchRemoveSecuRule(List<String> ids);

    //==================== zhangchunlin end ======================//

    //流量阈值设置//
    //分页查询
    Page getClientLimitList(Data dataMap) throws Exception;
    //获取阈值信息
    ClientLimitInfoVo getClientLimitInfoByIp(Data params) throws Exception;
    //修改阈值
    int updateClientLimit(Data params) throws Exception;




}
